package com.jintoufs.service.date.impl;

import com.jintoufs.dao.date.DateBeanMapper;
import com.jintoufs.domain.date.DateBean;
import com.jintoufs.service.date.DateBeanService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class DateBeanServiceImpl implements DateBeanService {
    @Resource
    private DateBeanMapper dateBeanMapper;

    @Override
    public void insert(DateBean dateBean) {
        dateBeanMapper.insert(dateBean);
    }

    @Override
    public boolean isExist(String date) {
        return dateBeanMapper.isExist(date)>0;
    }

    @Override
    public DateBean getLast() {
        return dateBeanMapper.getLast();
    }
}
